{template 'common/header'}
<ul class="nav nav-tabs">
        <li>
            <a href="{php echo $this->createWebUrl('repair', array('op' => 'list'));}">管理</a>
        </li>
        <li class="active">
            <a href="{php echo $this->createWebUrl('repair', array('op' => 'post','id'=>$item['id']));}">编辑</a>
        </li>
    </ul>
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">详情</h3>
        </div>
      <div class="panel-body">
      <pre>内容：<span class="label label-info">{$item['content']}</span>&nbsp;需求：<span class="label label-info">{$item['requirement']}</span>&nbsp;状态：{if $item['status'] == 1}<span class="label label-success">已处理</span>{elseif $item['status'] == 3}<span class="label label-info">处理中</span>{else}<span class="label label-primary">未处理</span>{/if}</pre>
      {if $item['rank']}
      <pre>评价：<span class="label label-info">{if $item['rank'] == 1}满意{elseif $item['rank'] == 2}一般{else}不满意{/if}&nbsp;&nbsp;{$item['comment']}</span></pre>
      {/if}
      {if $imgs}
         {loop $imgs $img}
         <img src="{$img['src']}" alt="..." class="img-thumbnail" width="160">
         {/loop}
      {/if}
      </div>
    </div>
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">处理</h3>
        </div>
      <div class="panel-body">
      <form action="" class="form-horizontal form" method="post">
        <div class="form-group">
            <label for="" class="col-sm-2 control-label">状态:</label>
            <div class="col-sm-3">
              <select name="status" class="form-control">
                    <option value="2" {if intval($item[ 'status'])==2} selected{/if}>未处理</option>
                    <option value="3" {if intval($item[ 'status'])==3} selected{/if}>处理中</option>
                    <option value="1" {if intval($item[ 'status'])==1} selected{/if}>已处理</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-sm-2 control-label">处理结果:</label>
            <div class="col-sm-3">
               <textarea style="height:100px;" class="form-control" name="resolve" cols="70">{$item['resolve']}</textarea>
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-sm-2 control-label">处理人:</label>
            <div class="col-sm-3">
              <input type="text" value="{$item['resolver']}" name='resolver' class="form-control" />
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-sm-2 control-label"></label>
            <div class="col-sm-2">
                <button type="submit" class="btn btn-primary btn-block" name="submit" value="提交">提交</button>
                <input type="hidden" name="token" value="{$_W['token']}" />
                <input type="hidden" name="id" value="{$item['id']}" />
            </div>
        </div>
      </form>
      
      </div>
    </div>
   

 <div id="galleria"></div>
    <script>
    // Load theme
    Galleria.loadTheme('{MODULE_URL}static/js/galleria.lightbox.js');

    $('#galleria').galleria({
        data_source: '#list',
        extend: function() {
            this.bind(Galleria.LOADFINISH, function(e) {
                $(e.imageTarget).click(this.proxy(function(e) {
                    e.preventDefault();
                    this.next();
                }))
            })
        },
        keep_source: true,
        data_config: function(img) {
            return {
                description: $(img).next('.caption').html()
            }
        }
    });
</script>
{template 'common/footer'}